My meme

This is a meme that tells people’s feelings during workdays.

My meme

# Import package magick
library(magick)

# Import cat sleeping image and resize it
cat_sleeping <- image_read("Cat_sleeping.png") %>% 
  image_scale(500)

# Import cat awake image and resize it
cat_awake <- image_read("Cat_awake.png") %>% 
  image_scale(500)

# Create text "8:00 am"
eight_am_text <- image_blank(width = 500, 
                             height = 500, 
                             color = "#000000") %>%
  image_annotate(text = "8:00 am",
                 color = "#FFFFFF",
                 size = 80,
                 font = "Impact",
                 gravity = "center")

# Create text "2:00 pm"
two_pm_text <- image_blank(width = 500, 
                           height = 500, 
                           color = "#000000") %>%
  image_annotate(text = "2:00 pm", 
                 color = "#FFFFFF", 
                 size = 80, 
                 font = "Impact", 
                 gravity = "center")

# Create text "10:00 pm"
ten_pm_text <- image_blank(width = 500, 
                           height = 500, 
                           color = "#000000") %>%
  image_annotate(text = "10:00 pm", 
                 color = "#FFFFFF", 
                 size = 80, 
                 font = "Impact", 
                 gravity = "center")

# Combine the cat sleeping image and the text "8:00 am" into the first row
first_row <- c(cat_sleeping, eight_am_text) %>%
  image_append()

# Combine the cat sleeping image and the text "2:00 pm" into the second row
second_row <- c(cat_sleeping, two_pm_text) %>%
  image_append()

# Combine the cat awake image and the text "10:00 pm" into the third row
third_row <- c(cat_awake, ten_pm_text) %>%
  image_append()

# Combine all three rows into an image
meme <- c(first_row, second_row, third_row) %>%
  image_append(stack = TRUE)

# Show the image to the viewer and export it
meme

meme %>%
  image_write("my_meme.png")

My animated GIF

This is a meme that tells people’s feelings during workdays. I converted it into a GIF to be suitable for different uses.

My animated GIF

# Import package magick
library(magick)

#Create frames
frame1 <- image_blank(width = 500, 
                      height = 500, 
                      color = "#000000") %>%
  image_annotate(text = "8:00 am",
                 color = "#FFFFFF",
                 size = 80,
                 font = "Impact",
                 gravity = "center")

frame2 <- image_read("Cat_sleeping.png") %>% 
  image_scale(500)

frame3 <- image_blank(width = 500, 
                      height = 500, 
                      color = "#000000") %>%
  image_annotate(text = "2:00 pm", 
                 color = "#FFFFFF", 
                 size = 80, 
                 font = "Impact", 
                 gravity = "center")

frame4 <- image_read("Cat_sleeping.png") %>% 
  image_scale(500)

frame5 <- image_blank(width = 500, 
                      height = 500, 
                      color = "#000000") %>%
  image_annotate(text = "10:00 pm", 
                 color = "#FFFFFF", 
                 size = 80, 
                 font = "Impact", 
                 gravity = "center")

frame6 <- image_read("Cat_awake.png") %>% 
  image_scale(500)

#Combine all frames
frames <- c(frame1, frame2, frame3, frame4, frame5, frame6)

animation <- frames %>%
  image_animate(fps = 1)

#Show the animation to the viewer and export it
animation

animation %>%
  image_write("my_animation.gif")
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap');
body {
      font-family: 'Open Sans', sans-serif;
      background-image: linear-gradient(to bottom, #99ffe6, #c6e2ff);
}

Link to Report